import Vue from 'vue'
import VueRouter from 'vue-router'
import home from '@/views/home/home.vue'
import index from '@/views/index.vue'
import test from '@/views/test/test.vue'
import  adapter from '@/views/adpater/adapter.vue'
import qrcode from '@/views/qrcode/index.vue'
import tree from '@/views/tree/index.vue';
Vue.use(VueRouter)
// 更改为动态引入性能更好点
const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes: [{
        path: "/",
        component:index,
        redirect:'/home',
        children:[
            {
                path:'/home',
                component:home
            },
            {
                path:'/test',
                component:test
            },
            {
                path:'/adapter',
                component:adapter
            },
            {
                path:'/qrcode',
                component:qrcode
            },
            {
                path:'/tree',
                component:tree
            }
        ]   
    }]
})

export default router